package cumt.kydd.authoringplatform.controller;

import cumt.kydd.authoringplatform.bean.History;
import cumt.kydd.authoringplatform.service.DeleteHistoryService;
import cumt.kydd.authoringplatform.service.FavorHistoryService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("history")
public class FlavorHistoryController {
    @Resource
    private FavorHistoryService favorHistoryService;

    @GetMapping("favor")
    public Map<String, Object> favorHistory(int is_favor,int flag_now_his) {
        return favorHistoryService.favorHistory(is_favor,flag_now_his);
    }

    @GetMapping("favor_cancel")
    public Map<String, Object> cancelFavorHistory(int is_favor,int flag_now_his) {
        return favorHistoryService.cancelFavorHistory(is_favor,flag_now_his);
    }
}
